<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> 	
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->

    <title>用户登录</title>

    <!-- Bootstrap core CSS -->
    <link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="<%=basePath%>css/login.css" rel="stylesheet">

  </head>

  <body>
    
    <div class="container">
      <div>
        <form:form modelAttribute="user" method="POST" class="form-login">
        <h2 class="form-login-heading">账户登录</h2>
        <div>
          <form:input path="userName" class="form-control" placeholder="用户名" required="required" autofocus="autofocus"/>
          <form:errors path="userName" class="field-has-error"></form:errors>
        </div>
        <div class="form-group">
          <form:password  path="password" class="form-control" placeholder="密码" required="required"/>
          <form:errors path="password" class="field-has-error"></form:errors>
        </div>
		<div class="form-group">
		  <input type="checkbox" name="remember" value="1"/>
		  <label>记住我</label>
		  <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
		</div>
	    </form:form>
	  </div>
	</div>

  </body>
</html>
